package ru.qrck.quitetaskmanager;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

public class StartupIntentReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {

		Intent serviceIntent = new Intent();

        SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);
				
		serviceIntent.setAction(pref.getBoolean("invert_color", false) 
								? ForegroundService.ACTION_FOREGROUND_IV 
								: ForegroundService.ACTION_FOREGROUND ) ;
		context.startService(serviceIntent);
	}

}
